package com.it.mapper;

import com.it.auth.LoginInfoDTO;
import com.it.bean.User;
import com.it.dto.UserDTO;
import com.it.vo.UserVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.additional.insert.InsertListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface UserMapper extends Mapper<User>, InsertListMapper<User> {
    UserVo findUser(@Param("loginInfo") LoginInfoDTO loginInfoDTO);

    List<UserVo> selectJoin(UserDTO queryBody);

    void replaceRoles(@Param("userId") Long id, @Param("roleIds") List<Long> roleIds);

    void inertUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId);
}
